<template>
	<view>
		<uni-nav-bar left-icon="arrowthinleft" title="修改登录密码" :border="false" bg="bg-zhuse" color="#fff"  @clickLeft="goBack()"></uni-nav-bar>
		<view class="padding-x-40 bg-fff">
			<view>
				<view class="flex align-center padding-y-30 margin-bottom-10 solid-bottom">
					<view class="psd_left">旧密码</view>
					<input class="flex1 fs-30 color-000 text-right" type="password" placeholder="请输入旧密码" v-model="info.oldpass" />
				</view>
				<view class="flex align-center padding-y-30 margin-bottom-10 solid-bottom">
					<view class="psd_left">新密码</view>
					<input class="flex1 fs-30 color-000 text-right" type="password" placeholder="密码为8-16位数字字母组合" v-model="info.loginpass" />
				</view>
				<view class="flex align-center padding-y-30 margin-bottom-10 solid-bottom">
					<view class="psd_left">确认新密码</view>
					<input class="flex1 fs-30 color-000 text-right" type="password" placeholder="密码为8-16位数字字母组合" v-model="info.quepass" />
				</view>
			</view>
		</view>
		<view class="padding-x-40">
			<view class="margin-top-88">
				<button class="public_btn" @tap="submit()">提交</button>
				<view class="margin-y-40 fs-30 color-zhuse text-center" @tap="jump(`/pages/public/forgetPsd`)">忘记密码</view>
			</view>
		</view>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				info:{
					oldpass:'',
					loginpass:'',
					quepass:''
				}
			};
		},
		onLoad() {
			
		},
		methods: {
			submit(){
				this.$api.changePass(this.info).then(res=>{
					this.$msg(res.msg);
					if(res.code == 1){
						setTimeout(()=>{
							uni.navigateBack();
						}, 300);
					}
				})
			}
		}
	};
</script>

<style lang="scss" scoped>
	
</style>
